package com.java.controller;

//import com.example.demo902.module.entity.UserVisitAction;
//import com.example.demo902.module.vo.ResultVO;
import com.java.model.ResultVO;
import com.java.model.UserVisitAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/user")
public class UserVisitActionController {
    @Autowired
    private KafkaTemplate kafkaTemplate;
    @PostMapping("/track")
    public ResultVO track(UserVisitAction userVisitAction) throws Exception{
        System.out.println(userVisitAction.toString());
//        kafkaTemplate.send("connectionTest",userVisitAction.toString());
        return  new ResultVO();
    }
}
